<extend name="Layout:ly2"/>

<block name="head">
    <script type="text/javascript">
        $(function(){
            var status = {$status};
            if(status != ''){
                if(status == 1){
                    layer.msg("修改成功，1秒后自动关闭~~",{ico:1,time:1000},function(){
                        parent.window.location.reload();    //刷新父页面
                        return false;
                    })
                }else if(status == 2){
                    layer.msg("参数异常，1秒后自动关闭~~",{ico:1,time:1000},function(){
                        parent.window.location.reload();    //刷新父页面
                        return false;
                    })
                }else{
                    layer.msg("修改失败，1秒后自动关闭~~",{ico:1,time:1000},function(){
                        parent.window.location.reload();    //刷新父页面
                        return false;
                    })
                }
            }
        })
    </script>
</block>

<block name="body">
    <div class="container-fluid">
        <h3 id="title" align="center">修改头像</h3>
        <div class="padding20">
            <form action="{:U('Admin/Member/member_avatar')}" method="post" enctype="multipart/form-data" class="form-horizontal p90">
                <input type="hidden" name="action" value="avatar" />
                <input type="hidden" name="userid" value="{$data[0]['userid']}" />
                <div class="form-group">
                    <label class="col-sm-2 control-label">用户帐号：</label>
                    <div class="col-sm-8">
                        <input type="text" name="mobile" class="form-control" id="mobile" value="{$data[0]['mobile']}" readonly />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">上传图片：</label>
                    <div class="col-sm-8">
                        <input type="file" name="avatar" id="avatar">
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" id="btn-submit" class="btn btn-success">提交</button>&nbsp;&nbsp;&nbsp;&nbsp;
                        <button type="reset" class="btn btn-default">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

</block>